<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/TcpIoSocket.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">TcpIoSocket.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_tcp_io_socket_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __TCPIOSOCKET_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __TCPIOSOCKET_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_socket_8h.html">./internal/Socket.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tcp_base_8h.html">./internal/TcpBase.h</a>&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;../stream/StreamByte.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html">   17</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> : <span class="keyword">public</span> <a class="code" href="class_c_socket.html">CSocket</a></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <a class="code" href="class_c_tcp_io_socket.html#ab15830159a82983fb7e405ef7b5dbe95">delete_class_copy_operator</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>);</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ab09b60726510de222eca5e6c7cd956e0">   22</a></span>&#160;    <a class="code" href="class_c_tcp_io_socket.html#ab09b60726510de222eca5e6c7cd956e0">CTcpIoSocket</a>() :<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>), <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {}</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass&gt;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#afff7bbbf9577a732afbfdd32c5dc2e5f">   29</a></span>&#160;    <a class="code" href="class_c_tcp_io_socket.html#afff7bbbf9577a732afbfdd32c5dc2e5f">CTcpIoSocket</a>(CTcpIoClass* service, <a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>* acceptSock = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>)</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        :<a class="code" href="class_c_socket.html">CSocket</a>(service == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> ? <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> : service-&gt;GetTcpServicePtr()), <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>(acceptSock), <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>(service) {}</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a8393fcf491750be3369798d465df3a80">   33</a></span>&#160;    <a class="code" href="class_c_tcp_io_socket.html#a8393fcf491750be3369798d465df3a80">CTcpIoSocket</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service) :<a class="code" href="class_c_socket.html">CSocket</a>(service), <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>), <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>(<a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {}</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a6d44c7a86c239466a935ce7a4f3ebaec">   36</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_c_tcp_io_socket.html#a6d44c7a86c239466a935ce7a4f3ebaec">~CTcpIoSocket</a>() {}</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#ifdef STD11</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <a class="code" href="class_c_tcp_io_socket.html#ab09b60726510de222eca5e6c7cd956e0">CTcpIoSocket</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp;&amp; sock) :<a class="code" href="class_c_socket.html">CSocket</a>(std::move(sock)) {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        sock._accept = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>; sock._ioService = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        std::swap(<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>, sock.<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        std::swap(<a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>, sock._ioService);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; operator= (<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp;&amp; sock){</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;sock)</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        {</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a> = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a> = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            std::swap(<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>, sock.<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            std::swap(<a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>, sock._ioService);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            *dynamic_cast&lt;CSocket*&gt;(<span class="keyword">this</span>) = std::move(*dynamic_cast&lt;CSocket*&gt;(&amp;sock));</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        }</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    }</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ac25efea12d58e055882e7e79d132b7d6">   60</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#ac25efea12d58e055882e7e79d132b7d6">Swap</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>&amp; sock){</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        std::swap(<a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>, sock.<a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        std::swap(<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>, sock.<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <a class="code" href="class_c_socket.html#a816347ac8821a8288a38645702bee10e">CSocket::Swap</a>(*dynamic_cast&lt;CSocket*&gt;(&amp;sock));</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a6684a9f52783e84a4ff345aa12bc2974">   71</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a6684a9f52783e84a4ff345aa12bc2974">SetAccept</a>(<a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>* acceptSock){</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        this-&gt;<a class="code" href="class_c_socket.html#ad08fc2df680d1fd84035f5aada97dd3a">SetService</a>(acceptSock-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>());</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a> = acceptSock;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass&gt;</div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a52882323e9280841369ba84fec907d38">   82</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a52882323e9280841369ba84fec907d38">SetIoService</a>(CTcpIoClass* service){</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a> = service;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        this-&gt;<a class="code" href="class_c_socket.html#ad08fc2df680d1fd84035f5aada97dd3a">SetService</a>(service-&gt;GetTcpServicePtr());</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass&gt;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ab199b00bb5e7f99ddec0c89ce464d302">   92</a></span>&#160;    CTcpIoClass* <a class="code" href="class_c_tcp_io_socket.html#ab199b00bb5e7f99ddec0c89ce464d302">GetIoService</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (CTcpIoClass*)<a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>; }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a02dd34e4ee461e7ecdd0b4446b183ceb">   95</a></span>&#160;    <a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>* <a class="code" href="class_c_tcp_io_socket.html#a02dd34e4ee461e7ecdd0b4446b183ceb">GetIoSocket</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>; }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#aba0dd7f75bd1164192bc354e85361586">  104</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#aba0dd7f75bd1164192bc354e85361586">AsyncAccept</a>(<span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a> != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> &amp;&amp; this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncAccept(*<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>, *<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> AcceptHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        }</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ababda7bed7cbba58990ff113cfa2c353">  110</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#ababda7bed7cbba58990ff113cfa2c353">AsyncAccept</a>(<span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker){</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a> != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> &amp;&amp; this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncAccept(*<a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>, *<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> AcceptHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#adcb88b0856fed1f88ccc27beb919b6a5">  117</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#adcb88b0856fed1f88ccc27beb919b6a5">AsyncConnect</a>(Func func) {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncConnect(*<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        }</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#aa9a376048b3ddfe00ffe6ddff37b1791">  123</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#aa9a376048b3ddfe00ffe6ddff37b1791">AsyncConnect</a>(Func func, <span class="keywordtype">void</span>* invoker){</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncConnect(*<span class="keyword">this</span>, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">  130</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">AsyncRead</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRead(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a6bf3511da142b7a33fe04480b5b1d39e">  136</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a6bf3511da142b7a33fe04480b5b1d39e">AsyncRead</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncRead(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a8f5c6e049211a3f7c607d5bdfa978649">  143</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a8f5c6e049211a3f7c607d5bdfa978649">AsyncSend</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSend(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandleNull&lt;Func&gt;(func)));</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        }</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    }</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a3cc14960a90faa67427fa211b5ae9851">  149</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a3cc14960a90faa67427fa211b5ae9851">AsyncSend</a>(<span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">if</span> (this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>() != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(this-&gt;<a class="code" href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">GetService</a>())-&gt;AsyncSend(*<span class="keyword">this</span>, buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass, <span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">  156</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">Post</a>(CTcpIoClass* service, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(service-&gt;GetTcpServicePtr())-&gt;<a class="code" href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)));</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> CTcpIoClass, <span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a1b864636ce904f1a465b773133e6e21a">  162</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a1b864636ce904f1a465b773133e6e21a">Post</a>(CTcpIoClass* service, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(service-&gt;GetTcpServicePtr())-&gt;<a class="code" href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#a321cd3e579d733698eddc470f7061b1d">  169</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#a321cd3e579d733698eddc470f7061b1d">Post</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service, <span class="keyword">const</span> Func&amp; func) {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(service)-&gt;Post(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)));</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#ae8cf3edbb291309f59540bcce325b475">  175</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_c_tcp_io_socket.html#ae8cf3edbb291309f59540bcce325b475">Post</a>(<a class="code" href="class_c_basic_service.html">CBasicService</a>* service, <span class="keyword">const</span> Func&amp; func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">if</span> (service != <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) {</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;            dynamic_cast&lt;CTcpBase*&gt;(service)-&gt;Post(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">  183</a></span>&#160;    <a class="code" href="class_c_tcp_io_socket.html">CTcpIoSocket</a>* <a class="code" href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">_accept</a>;      </div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">  184</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">_ioService</a>;           </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;};</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="preprocessor">#endif // __TCPIOSOCKET_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_tcp_io_socket_html_a6a56c3461c4b9a5203c135278e4a287b"><div class="ttname"><a href="class_c_tcp_io_socket.html#a6a56c3461c4b9a5203c135278e4a287b">CTcpIoSocket::Post</a></div><div class="ttdeci">static void Post(CTcpIoClass *service, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00156">TcpIoSocket.h:156</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ab15830159a82983fb7e405ef7b5dbe95"><div class="ttname"><a href="class_c_tcp_io_socket.html#ab15830159a82983fb7e405ef7b5dbe95">CTcpIoSocket::delete_class_copy_operator</a></div><div class="ttdeci">delete_class_copy_operator(CTcpIoSocket)</div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a1b864636ce904f1a465b773133e6e21a"><div class="ttname"><a href="class_c_tcp_io_socket.html#a1b864636ce904f1a465b773133e6e21a">CTcpIoSocket::Post</a></div><div class="ttdeci">static void Post(CTcpIoClass *service, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00162">TcpIoSocket.h:162</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ab199b00bb5e7f99ddec0c89ce464d302"><div class="ttname"><a href="class_c_tcp_io_socket.html#ab199b00bb5e7f99ddec0c89ce464d302">CTcpIoSocket::GetIoService</a></div><div class="ttdeci">CTcpIoClass * GetIoService() const</div><div class="ttdoc">返回服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00092">TcpIoSocket.h:92</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_afff7bbbf9577a732afbfdd32c5dc2e5f"><div class="ttname"><a href="class_c_tcp_io_socket.html#afff7bbbf9577a732afbfdd32c5dc2e5f">CTcpIoSocket::CTcpIoSocket</a></div><div class="ttdeci">CTcpIoSocket(CTcpIoClass *service, CTcpIoSocket *acceptSock=NullPtr)</div><div class="ttdoc">构造一个tcp套接字，并设置服务类、监听的套接字类指针</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00029">TcpIoSocket.h:29</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a02dd34e4ee461e7ecdd0b4446b183ceb"><div class="ttname"><a href="class_c_tcp_io_socket.html#a02dd34e4ee461e7ecdd0b4446b183ceb">CTcpIoSocket::GetIoSocket</a></div><div class="ttdeci">CTcpIoSocket * GetIoSocket() const</div><div class="ttdoc">返回监听服务套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00095">TcpIoSocket.h:95</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_adcb88b0856fed1f88ccc27beb919b6a5"><div class="ttname"><a href="class_c_tcp_io_socket.html#adcb88b0856fed1f88ccc27beb919b6a5">CTcpIoSocket::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00117">TcpIoSocket.h:117</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a6bf3511da142b7a33fe04480b5b1d39e"><div class="ttname"><a href="class_c_tcp_io_socket.html#a6bf3511da142b7a33fe04480b5b1d39e">CTcpIoSocket::AsyncRead</a></div><div class="ttdeci">void AsyncRead(const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00136">TcpIoSocket.h:136</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_aa900af6ecb7688096251b49076fd67f3"><div class="ttname"><a href="class_c_tcp_io_socket.html#aa900af6ecb7688096251b49076fd67f3">CTcpIoSocket::_accept</a></div><div class="ttdeci">CTcpIoSocket * _accept</div><div class="ttdoc">用于存储受监听的套接字</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00183">TcpIoSocket.h:183</a></div></div>
<div class="ttc" id="aclass_c_socket_html_a4639bf4536b44ec11a7fc37b73981c8e"><div class="ttname"><a href="class_c_socket.html#a4639bf4536b44ec11a7fc37b73981c8e">CSocket::GetService</a></div><div class="ttdeci">virtual CBasicService * GetService() const</div><div class="ttdoc">返回服务基类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00271">Socket.cpp:271</a></div></div>
<div class="ttc" id="aclass_c_socket_html_a816347ac8821a8288a38645702bee10e"><div class="ttname"><a href="class_c_socket.html#a816347ac8821a8288a38645702bee10e">CSocket::Swap</a></div><div class="ttdeci">virtual void Swap(CSocket &amp;sock)</div><div class="ttdoc">交换两个套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00290">Socket.cpp:290</a></div></div>
<div class="ttc" id="aclass_c_socket_html"><div class="ttname"><a href="class_c_socket.html">CSocket</a></div><div class="ttdoc">套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8h_source.html#l00030">Socket.h:30</a></div></div>
<div class="ttc" id="aclass_c_socket_html_ad08fc2df680d1fd84035f5aada97dd3a"><div class="ttname"><a href="class_c_socket.html#ad08fc2df680d1fd84035f5aada97dd3a">CSocket::SetService</a></div><div class="ttdeci">virtual void SetService(CBasicService *service)</div><div class="ttdoc">关联相应的工作类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8cpp_source.html#l00047">Socket.cpp:47</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_aece14942f3452909327696c121238fc5"><div class="ttname"><a href="class_c_tcp_io_socket.html#aece14942f3452909327696c121238fc5">CTcpIoSocket::_ioService</a></div><div class="ttdeci">void * _ioService</div><div class="ttdoc">用于存储用户传递的CTcpIoClient/CTcpIoServer类型</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00184">TcpIoSocket.h:184</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ac25efea12d58e055882e7e79d132b7d6"><div class="ttname"><a href="class_c_tcp_io_socket.html#ac25efea12d58e055882e7e79d132b7d6">CTcpIoSocket::Swap</a></div><div class="ttdeci">virtual void Swap(CTcpIoSocket &amp;sock)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00060">TcpIoSocket.h:60</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_post_handle_html"><div class="ttname"><a href="class_post_handle.html">PostHandle</a></div><div class="ttdoc">用户投递回调</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00242">SockTools.h:242</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a3cc14960a90faa67427fa211b5ae9851"><div class="ttname"><a href="class_c_tcp_io_socket.html#a3cc14960a90faa67427fa211b5ae9851">CTcpIoSocket::AsyncSend</a></div><div class="ttdeci">void AsyncSend(const CStreamIteator &amp;buff, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00149">TcpIoSocket.h:149</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a52882323e9280841369ba84fec907d38"><div class="ttname"><a href="class_c_tcp_io_socket.html#a52882323e9280841369ba84fec907d38">CTcpIoSocket::SetIoService</a></div><div class="ttdeci">void SetIoService(CTcpIoClass *service)</div><div class="ttdoc">设置服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00082">TcpIoSocket.h:82</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a321cd3e579d733698eddc470f7061b1d"><div class="ttname"><a href="class_c_tcp_io_socket.html#a321cd3e579d733698eddc470f7061b1d">CTcpIoSocket::Post</a></div><div class="ttdeci">static void Post(CBasicService *service, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00169">TcpIoSocket.h:169</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_aa9a376048b3ddfe00ffe6ddff37b1791"><div class="ttname"><a href="class_c_tcp_io_socket.html#aa9a376048b3ddfe00ffe6ddff37b1791">CTcpIoSocket::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00123">TcpIoSocket.h:123</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a6684a9f52783e84a4ff345aa12bc2974"><div class="ttname"><a href="class_c_tcp_io_socket.html#a6684a9f52783e84a4ff345aa12bc2974">CTcpIoSocket::SetAccept</a></div><div class="ttdeci">virtual void SetAccept(CTcpIoSocket *acceptSock)</div><div class="ttdoc">设置服务类的监听套接字</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00071">TcpIoSocket.h:71</a></div></div>
<div class="ttc" id="a_tcp_base_8h_html"><div class="ttname"><a href="_tcp_base_8h.html">TcpBase.h</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a8f5c6e049211a3f7c607d5bdfa978649"><div class="ttname"><a href="class_c_tcp_io_socket.html#a8f5c6e049211a3f7c607d5bdfa978649">CTcpIoSocket::AsyncSend</a></div><div class="ttdeci">void AsyncSend(const CStreamIteator &amp;buff, const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00143">TcpIoSocket.h:143</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a8393fcf491750be3369798d465df3a80"><div class="ttname"><a href="class_c_tcp_io_socket.html#a8393fcf491750be3369798d465df3a80">CTcpIoSocket::CTcpIoSocket</a></div><div class="ttdeci">CTcpIoSocket(CBasicService *service)</div><div class="ttdoc">构造一个tcp io socket对象并设置内部服务类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00033">TcpIoSocket.h:33</a></div></div>
<div class="ttc" id="aclass_post_handle_null_html"><div class="ttname"><a href="class_post_handle_null.html">PostHandleNull</a></div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00255">SockTools.h:255</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ababda7bed7cbba58990ff113cfa2c353"><div class="ttname"><a href="class_c_tcp_io_socket.html#ababda7bed7cbba58990ff113cfa2c353">CTcpIoSocket::AsyncAccept</a></div><div class="ttdeci">void AsyncAccept(const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00110">TcpIoSocket.h:110</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ac93112cd926967d84b44344285aaa04d"><div class="ttname"><a href="class_c_tcp_io_socket.html#ac93112cd926967d84b44344285aaa04d">CTcpIoSocket::AsyncRead</a></div><div class="ttdeci">void AsyncRead(const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00130">TcpIoSocket.h:130</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ab09b60726510de222eca5e6c7cd956e0"><div class="ttname"><a href="class_c_tcp_io_socket.html#ab09b60726510de222eca5e6c7cd956e0">CTcpIoSocket::CTcpIoSocket</a></div><div class="ttdeci">CTcpIoSocket()</div><div class="ttdoc">构造一个tcp io socket对象</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00022">TcpIoSocket.h:22</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html"><div class="ttname"><a href="class_c_tcp_io_socket.html">CTcpIoSocket</a></div><div class="ttdoc">用于tcp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00017">TcpIoSocket.h:17</a></div></div>
<div class="ttc" id="a_socket_8h_html"><div class="ttname"><a href="_socket_8h.html">Socket.h</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_ae8cf3edbb291309f59540bcce325b475"><div class="ttname"><a href="class_c_tcp_io_socket.html#ae8cf3edbb291309f59540bcce325b475">CTcpIoSocket::Post</a></div><div class="ttdeci">static void Post(CBasicService *service, const Func &amp;func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00175">TcpIoSocket.h:175</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_aba0dd7f75bd1164192bc354e85361586"><div class="ttname"><a href="class_c_tcp_io_socket.html#aba0dd7f75bd1164192bc354e85361586">CTcpIoSocket::AsyncAccept</a></div><div class="ttdeci">void AsyncAccept(const Func &amp;func)</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00104">TcpIoSocket.h:104</a></div></div>
<div class="ttc" id="aclass_c_tcp_io_socket_html_a6d44c7a86c239466a935ce7a4f3ebaec"><div class="ttname"><a href="class_c_tcp_io_socket.html#a6d44c7a86c239466a935ce7a4f3ebaec">CTcpIoSocket::~CTcpIoSocket</a></div><div class="ttdeci">virtual ~CTcpIoSocket()</div><div class="ttdoc">析构函数</div><div class="ttdef"><b>Definition:</b> <a href="_tcp_io_socket_8h_source.html#l00036">TcpIoSocket.h:36</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
